<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>14-js的数据类型</title>
</head>

<body>

</body>
<script>
  let a = 1.1;
  let type = typeof a; //获取a的变量类型
  console.log(type); // number

  let b = 'abc';
  let type2 = typeof b;
  console.log(type2); // string

  let c = true;
  let type3 = typeof c;
  console.log(type3); // boolean

  let d = null;
  let type4 = typeof d;
  console.log(type4); // object (null是打印不出来的,这表示对象是null)

  let e;  //只声明变量不赋值
  let type5 = typeof e;
  console.log(type5); //  undefined
</script>

<script>
  //js对象的定义
  let jsObj = {
    name: "zs",
    age: 18,
    married: true
  }
  console.log(jsObj.name); // zs
</script>

</html>